# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-requests
pkgver=2.32.3
pkgrel=0
pkgdesc="HTTP request library for Python3"
url="https://requests.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
# Requirements for tests are not available in main
options="!check"
depends="
	py3-certifi
	py3-charset-normalizer
	py3-idna
	py3-urllib3
	python3
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/r/requests/requests-$pkgver.tar.gz"
builddir="$srcdir/requests-$pkgver"

replaces="py-requests" # Backwards compatibility
provides="py-requests=$pkgver-r$pkgrel" # Backwards compatibility

# secfixes:
#   2.32.3-r0:
#     - CVE-2024-35195

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
20d413597ff4803a62156ada25ef2e8a5edd0d4dbf7d79cc7fcd88d51a76e019a7dacf41d7c3d546306f37c506ede68f16b9afea57c918db64e702382b1ae420  requests-2.32.3.tar.gz
"
